
<html>
<head>
<title>常用脚本</title>
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
	<link href="../../build/common/base.css" rel="stylesheet">
	<script type="text/javascript" src="../../build/common/base.js"></script>
	<script type="text/javascript" src="../../build/common/gridList.js"></script>
</head>
<body>
<div class="panel-body" style="padding-bottom:0px;">
     <div class="panel panel-default search-panel">
         <div class="panel-heading">查询条件
         	<a　href="javascript:void(0)" class="pull-right">　<i class="fa  fa-angle-double-up" toggle-collapse="#searchForm"></i> </a>
         </div>
         <div class="panel-body">
             <form id="searchForm" class="form-horizontal">
                 <div class="form-group">
                     <label class="control-label col-sm-1" for="NAME_^VLK">名字</label>
                     <div class="col-sm-3">
                         <input type="text" class="form-control" id="NAME_^VLK">
                     </div>
                     <label class="control-label col-sm-1" for="CATEGORY_^VLK">脚本分类</label>
                     <div class="col-sm-3">
                         <select class="form-control" id="CATEGORY_^VLK">
							<option value="">请选择</option>
						</select>
                     </div>
                     <div class="col-sm-4" style="text-align:left;">
                         <button type="button" style="margin-left:50px" class="btn btn-primary fa-search">查询</button>
                         <button type="button" style="margin-left: 50px" class="btn btn-primary fa-rotate-left">重置</button>
                     </div>
                 </div>
             </form>
         </div>
     </div>
     <a h></a>
	 <div class="btn-group toolbar">
		  <button class="btn btn-outline btn-primary fa-plus" openDialog="新增脚本" url="scriptEdit">新增 </button>
      </div>
      <table ab-grid data-id-field="id" data-url="sys/script/listJson">
          <thead>
          <tr>
              <th data-checkbox="true">ID</th>
              <th data-field="name">名称</th>
              <th data-field="category" >脚本分类</th>
              <th data-field="memo" >备注</th>
              <th data-field="script" data-formatter="managerFormatter" >管理</th>
          </tr>
          </thead>
      </table>
    </div>
    
    <script>
		function managerFormatter(value, row, index) {
			var bts ="<a class='btn btn-outline btn-primary fa-edit' openDialog='编辑' qtip='编辑' url='scriptEdit.html?id="+ row.id +"'></a>";
			 bts += "<a class='btn btn-outline btn-primary fa fa-trash' sendAction='删除' qtip='编辑' url='/sys/script/remove?id="+row.id+"'></a>";
        	return bts;
		}
	</script>
</body>
</html>